package com.atguigu.gulimall.product.constant;

/**
 * @author: jianPing
 * @date: 2022/3/1 17:10
 * @description:
 */
public class ProductConstant {
    public enum AttrTypeEnum {
        SALE_ATTRIBUTE(0, "销售属性"),
        BASIC_ATTRIBUTE(1, "基本属性");

        private final Integer code;
        private final String desc;

        AttrTypeEnum(Integer code, String desc) {
            this.code = code;
            this.desc = desc;
        }

        public Integer getCode() {
            return code;
        }

        public String getDesc() {
            return desc;
        }
    }

    public enum SearchType {
        SEARCHABLE(1, "可检索"),
        UNSEARCHABLE(0, "不可检索");
        private final Integer code;
        private final String desc;

        SearchType(Integer code, String desc) {
            this.code = code;
            this.desc = desc;
        }

        public Integer getCode() {
            return code;
        }

        public String getDesc() {
            return desc;
        }
    }

    public enum PublishStatus {
        ON(1, "已上架"),
        DOWN(0, "已下架");

        private final Integer code;
        private final String desc;

        PublishStatus(Integer code, String desc) {
            this.code = code;
            this.desc = desc;
        }

        public Integer getCode() {
            return code;
        }

        public String getDesc() {
            return desc;
        }
    }
}
